<template>
	<div>
		<span @click="handleFocus">工作空间 -<el-button v-show="!focus" secondary>{{ comTitle }}</el-button>
		</span>
		<el-input
			v-show="focus"
			ref="inputInstRef"
			placeholder="请输入项目名称"
			v-model="comTitle"
			@keyup.enter="handleBlur"
			@blur="handleBlur"
			style="width: 200px"
		></el-input>
	</div>
</template>

<script>

export default {
	data() {
		return {
			comTitle:"sdfsdfsdf",
			focus:false
		}
	},
	mounted() {
	},
	methods: {
		handleFocus(){
			this.focus = true
			this.$refs.inputInstRef.focus()
		},
		handleBlur () {
			this.focus = false
		}
	}
}

</script>
